package com.glut.forum.config;

import ma.glasnost.orika.MapperFacade;
import ma.glasnost.orika.impl.DefaultMapperFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author milo
 * @version 1.0
 * @since 2021/9/5 上午9:07
 */
@Configuration
public class BeanConfig {

    // 添加Orika Java bean映射框架
    @Bean
    public MapperFacade mapperFacade() {
        return new DefaultMapperFactory.Builder().build().getMapperFacade();
    }
}
